package mblog.core.data.xml;


import mblog.base.utils.DateUtils;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Date;

/**
 * Project  : mblog
 * Author   : Wu Tian Qiang
 * Date     : 2016/7/21
 */
@XmlRootElement(name="url")
public class URL {
    private String loc;
    private String lastmod;
    private String changefreq;
    private String priority;

    public URL() {
    }

    public URL(long id) {
        this.loc = "http://www.xianshiyue.com/view/" + id;
        this.lastmod = DateUtils.toDateText(new Date(), DateUtils.DATE_FORMAT);
        this.changefreq = "daily";
        this.priority = "1.0";
    }

    @XmlElement
    public String getLoc() {
        return loc;
    }

    public void setLoc(String loc) {
        this.loc = loc;
    }

    @XmlElement
    public String getLastmod() {
        return lastmod;
    }

    public void setLastmod(String lastmod) {
        this.lastmod = lastmod;
    }

    @XmlElement
    public String getChangefreq() {
        return changefreq;
    }

    public void setChangefreq(String changefreq) {
        this.changefreq = changefreq;
    }

    @XmlElement
    public String getPriority() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority = priority;
    }
}
